import java.util.HashMap;
import java.util.Map;

/**
 * Created by bjliuyue1 on 2017/5/21.
 */
public class Main {

    public static void main(String[] args) throws Exception {
        Map<String, Integer> map = new HashMap<>();
        String result;
        int i = 0;
        while (i++ < 1000) {
            result = HttpTools.getResponseFromUrl("http", "localhost", 8764, "/string");
            //            System.out.println(result);
            if (map.get(result) != null) {
                map.put(result, map.get(result) + 1);
            }
            else {
                map.put(result, 1);
            }
        }
        for (Map.Entry entry : map.entrySet()) {
            System.out.println(entry.getKey() + ":" + entry.getValue());
        }
    }
}
